import request from '@/utils/request'

export function getRoleList (data) {
  return request({
    url: '/api/setting/role/index',
    method: 'post',
    data
  })
}

export function deleteRole (data) {
  return request({
    url: '/api/setting/role/delete',
    method: 'post',
    data
  })
}

export function createRole (data) {
  return request({
    url: '/api/setting/role/store',
    method: 'post',
    data
  })
}

export function updateRole (data) {
  return request({
    url: '/api/setting/role/update',
    method: 'post',
    data
  })
}

export function distributionMenus (data) {
  return request({
    url: '/api/setting/role/distribution-menus',
    method: 'post',
    data
  })
}

export function distributionRoutes (data) {
  return request({
    url: '/api/setting/role/distribution-routes',
    method: 'post',
    data
  })
}

export function getRoleMenus (data) {
  return request({
    url: '/api/setting/role/menus',
    method: 'post',
    data
  })
}

export function getRoleRoutes (data) {
  return request({
    url: '/api/setting/role/routes',
    method: 'post',
    data
  })
}
